<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body {
	background-color: #CCC;
}
</style>
<script language="Javascript"> 
function AddClick(){
val1 = document.getElementById("fname").value;
val2 = document.getElementById("lname").value;
 if(val1!=""){
  document.getElementById("fn").checked = true;
 }
 if(va1==""){
	document.getElementById("fn").checked = false; 
 }
 }
</script>
</head>

<body>
<table width="350" align="center" cellpadding="3" cellspacing="1">
  <tr>
    <td width="265">First Name
    <input type="text" name="fname" id="fname" onchange="AddClick();" onblur="AddClick();" /></td>
    <td width="68"><input type="checkbox" name="fn" id="fn" /></td>
  </tr>
  <tr>
    <td>Last Name
    <input type="text" name="lname" id="lname" onchange="AddClick();" onblur="AddClick();" /></td>
    <td><input type="checkbox" name="ln" id="ln" /></td>
  </tr>
</table>
</body>
</html>